package com.spring.format.code.generation.util;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.spring.format.code.generation.constants.Constants;

/**
 * 表帮助类
 * @author Administrator
 *
 */
public class TableUtil {

	private TableUtil() {
		
	}
	/**
	 * 需要生成代码的表名称集合
	 */
	public static final List<String> tableNameList = new ArrayList<>();
	
	static {
		if(Constants.YES.equalsIgnoreCase(Constants.CREATE_TABLE_LIMIT)) {
			//不可编辑阻断
			String fieldStr = Constants.CREATE_TABLE_ONLY;
			if (StringUtils.isNotBlank(fieldStr)) {
				String[] fields = fieldStr.split(",");
				for (String field : fields) {
					tableNameList.add(field);
				}
			}
		}
	}
}
